package com.usian.admin.feign;

import com.usian.model.admin.dtos.NewsAuthDto;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.media.pojos.WmNews;
import com.usian.model.media.pojos.WmUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient("leadnews-wemedia")
public interface WemediaFeign {
@GetMapping("/wemedia/api/v1/news/getone/{id}")
WmNews findById(@PathVariable Integer id);
@PostMapping("wemedia/api/v1/news/updateWmnes")
    ResponseResult updateWmNews(@RequestBody WmNews wmNews);
@GetMapping("wemedia/api/v1/user/findOne/{id}")
    WmUser findWmUserById(@PathVariable("id") Long id);
    @PostMapping("/wemedia/api/v1/news/updateWmnes")
    ResponseResult updateStatusAndReason(@RequestBody WmNews wmNews);
    @GetMapping("/wemedia/api/v1/news/findRelease")
    public List<Integer> findRelease();
    @PostMapping("/wemedia/api/v1/news/findRelease")
    public ResponseResult findList(@RequestBody NewsAuthDto dto);
}
